# coding=utf-8 

import unittest

import HTMLTestRunner
import time
import sys
sys.path.append('\testsuite')
from testsuite import baidu
from testsuite import youdao


testunit=unittest.TestSuite()

testunit.addTest(unittest.makeSuite(baidu.Baidu))
testunit.addTest(unittest.makeSuite(youdao.Youdao))

now = time.strftime('%Y-%m-%d-%H_%M_%S',time.localtime(time.time()))

filename= 'C:\\Users\\IBM_ADMIN\\workspace\\HelloWorld\\src\\selenium\\report\\'+now+'_result.html'
fp=file(filename,'wb')

#runner = unittest.TextTestRunner()
#runner.run(testunit)

runner=HTMLTestRunner.HTMLTestRunner(
                                     stream=fp,
                                     title=u'百度搜索测试报告',
                                     description=u'用例执行情况:'
                                     )
runner.run(testunit)